import request from '@/utils/request'

// 获取用户频道列表
export const getArtChannels = (params) => {
  return request({
    method: 'GET',
    url: '/channel/userchannels',
    params
  })
}

// 获取所有频道列表
export const getChannelsList = () => {
  return request({
    method: 'GET',
    url: '/channel/channels/all'
  })
}

// 添加用户频道
export const addUserChannel = (channelId) => {
  return request({
    method: 'PATCH',
    url: '/channel/userchannels',
    data: {
      channel_id: channelId
    }
  })
}

// 删除用户频道
export const delUserChannel = (channelId) => {
  return request({
    method: 'DELETE',
    url: `/channel/userchannels/${channelId}`
  })
}
